import httpInstance from '@/utils/http.js'; // 确保路径和导出项名称正确


//获取课程简介
export const getCourseIntro = (data) => {
    return httpInstance.get('/home/courseintro', {
        params: {
            courseId: data
        }
    })
}
//修改课程简介
export const updateCourseIntro = (data) => {
    return httpInstance.patch('/home/courseintro', data)
}
//获得教学团队
export const getTeacherTeam = (data) => {
    return httpInstance.get('/home/team', {
        params: {
            courseId: data
        }
    })
}
//更新教学团队
export const updateTeacherTeam = (data) => {
    return httpInstance.patch('/home/team', data, {
        headers: {
            'Content-Type': 'multipart/form-data'
        }
    })
}
//批量删除教学团队
export const deleteTeacherTeam = (data) => {
    console.log(data)
    return httpInstance.delete(`/home/team/${data}`)
}
//添加教学老师
export const insertTeacherTeam = (data) => {
    console.log(data)
    return httpInstance.post(`/home/team`, data)
}
//获取视频列表
export const getVideoList = (data) => {
    return httpInstance.get('/video', {
        params: data
    })
}
//获取视频详情
export const getVideoById = (data) => {
    return httpInstance.get(`/video/${data}`)
}
//审核视频
export const passVideo = (data) => {
    return httpInstance.patch(`/video`, data)
}